<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/13
 * Time: 16:07
 */

namespace mikkle\tp_swoole;


use mikkle\tp_redis\RedisHashInfoBase;

class SwooleOnlineTools extends RedisHashInfoBase
{

    protected $redisOptions=[
        "index"=>4
    ];

    protected function _initialize(){

    }

    public function addOnlineInfo( $fd ,$id ){
        return $this ->setInfoFieldValue( $id , $fd );
    }

    public function getOnlineInfoFdById( $id ){
        return $this->getInfoFieldValue( $id );
    }


    public function clearAllOnlineInfo(){
        return $this->delete();
    }




}